package com.cmc.cloud.cmclink.doc.convert;

import com.cmc.cloud.cmclink.doc.api.document.req.so.SpecialCargoVoyageBaseApiVO;
import com.cmc.cloud.cmclink.doc.entity.SpecialCargoVoyageDO;
import com.cmc.cloud.cmclink.doc.vo.blnovslvoyvo.BlnoVslvoyUpdateReqVO;
import com.cmc.cloud.cmclink.doc.vo.sovo.sovslvoyvo.SoVslvoyUpdateReqVO;
import com.cmc.cloud.cmclink.doc.vo.specialcargoapplyvo.SpecialCargoVoyageUpdateReqVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 特种货审批关联的船期信息 Convert
 *
 * @author 集运管理员
 */
@Mapper
public interface SpecialCargoVoyageConvert {

    SpecialCargoVoyageConvert INSTANCE = Mappers.getMapper(SpecialCargoVoyageConvert.class);

    /**
     * 属性转换 convert
     *
     * @param bean bean
     * @return SpecialCargoVoyageUpdateReqVO
     */
    SpecialCargoVoyageUpdateReqVO convert(SpecialCargoVoyageDO bean);

    /**
     * 属性转换 convert
     *
     * @param list list
     * @return SpecialCargoVoyageUpdateReqVO
     */
    List<SpecialCargoVoyageUpdateReqVO> convertList(List<SpecialCargoVoyageDO> list);

    /**
     * 属性转换 convert
     *
     * @param list list
     * @return SpecialCargoVoyageDO
     */
    List<SpecialCargoVoyageDO> convertDOList(List<SpecialCargoVoyageUpdateReqVO> list);

    /**
     * 属性转换 convert
     *
     * @param list list
     * @return SpecialCargoVoyageUpdateReqVO
     */
    List<SpecialCargoVoyageUpdateReqVO> convertApiList(List<SpecialCargoVoyageBaseApiVO> list);

    /**
     * 属性转换 convert
     *
     * @param bean bean
     * @return SpecialCargoVoyageDO
     */
    SpecialCargoVoyageDO convertDO(SpecialCargoVoyageUpdateReqVO bean);

    /**
     * 属性转换
     *
     * @param specialCargoVoyageDoList list
     * @return List<SpecialCargoVoyageBaseApiVO>
     */
    List<SpecialCargoVoyageBaseApiVO> convertSpecialCargoVoyageBaseApiVo(List<SpecialCargoVoyageDO> specialCargoVoyageDoList);

    /**
     * 属性转换
     *
     * @param soVslvoyUpdateReqVos soVslvoyUpdateReqVos
     * @return List<SpecialCargoVoyageDO>
     */
    List<SpecialCargoVoyageDO> convertSpecialCargoVoyageDos(List<SoVslvoyUpdateReqVO> soVslvoyUpdateReqVos);
    /**
     * 属性转换
     *
     * @param reqVo BlnoVslvoyUpdateReqVO
     * @return SpecialCargoVoyageDO
     */
    SpecialCargoVoyageDO convertVoyageDos(BlnoVslvoyUpdateReqVO reqVo);

    /**
     * 属性转换
     *
     * @param soVslvoyUpdateReqVo req
     * @return SpecialCargoVoyageDO
     */
    @Mappings({
            @Mapping(source = "vesselOperator", target = "carrier"),
            @Mapping(source = "laneCodeEx", target = "laneCode"),
            @Mapping(source = "spaceApproveStatus", target = "routeApproveStatus")
    })
    SpecialCargoVoyageDO cinvertSpecialCargoVoyageDo(SoVslvoyUpdateReqVO soVslvoyUpdateReqVo);

}
